package com.epmis.epmis.Mapper;

import com.epmis.epmis.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface ConsoleUserMapper {
    List<User> getAllUser(int id);

    List<User> getNoDepartmentUser(int id);

    List<User> getDepartmentUser(int enterpriseId,int id);

    int createMember(User user);

    User findSameUsername(String username);

    User findSameNumber(HashMap<String,Object> map);

    List<EnterpriseUser> getEnterpriseUser(int id);

    Integer addUser(@Param("User") User user);

    Integer addupdateUserUser(@Param("User") User user);

    User getUpdateUser(int id);

    boolean addSonDepartment(@Param("department") Department department);

    int enableMember(int id);

    List<EnterpriseUser> searchEnterpriseUser(String keyword, int id);

    boolean addPost(@Param("post")Post post);

    boolean updatePost(@Param("post") Post post);

    boolean deletePost(int id);

    List<User> getDisableUsers(int id);

    int disableUser(String username);

    List<Project> getProjectMessage(int id);

    List<Mission> getMissionMessage(int id);

    List<MissionProject> getMissionProjectMessage(int id);

    List<Target> getTargetMessage(int id);

    List<Hour> getHourMessage(int id);

    List<Cost> getCostMessage(int id);

    List<Examine> getExamineMessage(int id);

    List<ExamineProcess> getExaminProcessMessage(int id);

    boolean deleteProjectById(int id);

    boolean deleteMissionById(int id);

    boolean deleteMissionProjectById(int id);

    boolean deleteTargetById(int id);

    boolean deleteCostById(int id);

    boolean deleteExamineById(int id);

    boolean deleteHourById(int id);

    boolean deleteExamineProcessById(int id);

    void updateExamineProcess(@Param("examineProcess")ExamineProcess examineProcess);

    void uploadConsoleTimeExcel(@Param("hour")Hour hour);

    void uploadConsoleExamineExcel(@Param("examine")Examine examine);

    void uploadConsoleCostExcel(@Param("cost")Cost cost);

    void uploadConsoleTargetExcel(@Param("target")Target target);

    void uploadConsoleMissionProjectExcel(@Param("missionProject")MissionProject missionProject);

    void uploadConsoleMissionExcel(@Param("mission")Mission mission);

    void uploadConsoleProjectExcel(@Param("project")Project project);

    List<Post> getAllPost(int id);

    int updateMember(User user);
}
